package com.gaeainfo.modules.alarm.collection.dao;

import com.gaeainfo.modules.alarm.collection.entity.AlarmPersonEntity;
import com.gaeainfo.modules.alarm.collection.entity.AlarmVehicleEntity;
import com.gaeainfo.modules.alarm.collection.entity.PersonEntity;
import com.gaeainfo.modules.alarm.collection.entity.VehicleEntity;

import java.util.List;
import java.util.Map;

/**
 * Created by Caven on 2018/7/16.
 */
public interface AlarmCollectionDao {

    PersonEntity findPersonByIdCard(String idCard) throws Exception;

    PersonEntity findPersonByPhone(String phone) throws Exception;

    void savePerson(PersonEntity personEntity) throws Exception;

    void updatePerson(PersonEntity personEntity) throws Exception;

    void saveAlarmPerson(AlarmPersonEntity alarmPersonEntity) throws Exception;

    List<Map<String, Object>> findAlarmPersonByAlarmId(String alarmId) throws Exception;

    AlarmPersonEntity findAlarmPersonById(String alarmId, String personId) throws Exception;

    void deleteAlarmPerson(AlarmPersonEntity alarmPersonEntity) throws Exception;

    VehicleEntity findVehicleByPlateNo(String plateNo) throws Exception;

    void saveVehicle(VehicleEntity vehicleEntity) throws Exception;

    void saveAlarmVehicle(AlarmVehicleEntity alarmVehicleEntity) throws Exception;

    AlarmVehicleEntity findAlarmVehicleById(String alarmId, String vehicleId) throws Exception;

    void deleteAlarmVehicle(AlarmVehicleEntity alarmVehicleEntity) throws Exception;
}
